<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<PagedList<Pulog.Models.Comment>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>EditCommentList</h2>
    <% if (Model.Count == 0)
       {%>
            No Comments Found 
    <%} %>
    <%else
        { %>
    <table>
        <tr>
            <th></th>
            <th>
                Comment ID
            </th>
            <th>
                Post ID
            </th>
            <th>
                Comment
            </th>
            <th>
                CommentTime
            </th>
            <th>
                Posted By
            </th>
        </tr>
        <% foreach (var item in Model)
           { %>
            <tr>
                <td>
                    <%= Html.ActionLink("Edit", "EditComment", new { id = item.CommentID })%> |
                    <a id="DeleteComment" href="javascript:DeleteComment(<%=item.CommentID %>)">Delete</a>
                </td>
                <td>
                    <%= Html.Encode(item.CommentID)%>
                </td>
                <td>
                    <%= Html.Encode(item.AuthorName)%>
                </td>
                <td>
                    <%= Html.Encode(String.Format("{0:g}", item.CommentTime))%>
                </td>
                <td>
                    <%= Html.Encode(item.AuthorID)%>
                </td>
                <td>
                    <%= Html.Encode(item.AuthorIP)%>
                </td>
                <td>
                    <%= Html.Encode(item.AuthorEmail)%>
                </td>
                <td>
                    <%= Html.Encode(item.AuthorURL)%>
                </td>
            </tr>
        <% } %>
    </table>
     <% } %>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
